Skip to content

feat(mobile): add session goal section and /goal composer support - #6117

Merged
iscekic merged 1 commit into
mainfrom
kwf/add-goal-support-to-the-mobi-fa45
Sep 14, 2026
Merged

iscekic merged 1 commit into
mainfrom
kwf/add-goal-support-to-the-mobi-fa45

Conversation

@iscekic

@iscekic iscekic commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • Sessions that report a goal show a fixed goal section under the session header.
  • The section shows the goal status and objective, plus the CLI reason when the CLI provides one.
  • All four statuses render: active, paused, complete, and blocked; active is visually emphasized.
  • A session without a goal renders no section and keeps its existing layout.
  • Tapping the section offers Edit, Pause on an active goal or Resume otherwise, and Remove.
  • Edit sends /goal <objective>; Pause, Resume, and Remove forward /goal pause, /goal resume, and /goal clear.
  • Selecting /goal with no argument starts a goal compose mode; the next send forwards /goal <objective>.
  • A session whose catalog does not advertise goal shows the upgrade message instead of sending chat.

Changelog for maintainers

  • SessionInfo gains an optional goal; SessionGoal and SessionGoalStatus are exported from @kilocode/cloud-agent-sdk.
  • projectSessionGoal validates metadata['kilo.goal'] (and a nested kilo.goal), drops malformed values without throwing, and is exported.
  • The session-ingest messages endpoint returns sessionMetadata on the initial page only, best-effort and null when the snapshot read fails.
  • cliSessionsV2.getSessionMessagesPage projects the goal and strips the raw metadata so only sessionGoal reaches the client.
  • The mobile snapshot and page adapter carry the goal into info, so a session.created replay cannot drop the fixed row.
  • Service state keeps a known reason when a same-text, same-status update omits it; a status or text change clears it.
  • New agentChat.goal keys are added to the English catalog and every translated catalog.
  • Review hint: check chat-composer-slash-commands.ts, session-goal-actions.ts, and normalizer.ts first; the fail-closed and read-only paths plus clearing a pending question or permission around pause, resume, and edit are the risky parts.

E2E proof

Recording of the verified flow (waits trimmed)

p4-scroll.mp4.trim.mp4

Recording of the verified flow (waits trimmed)

p2-run.mp4.trim.mp4

Recording of the verified flow (waits trimmed)

p5-scroll.mp4.trim.mp4

Recording of the verified flow (waits trimmed)

p16-upgrade3.mp4.trim.mp4

[p6] needs:seed A blocked goal: a session whose metadata reports status blocked with a reason shows 'Goal blocked', the objective, and the reason text. — scripted-shard9/p6.png

[p10] ux-check: Goal with a reason shows the reason line; a goal without a reason shows none; complete/blocked/paused goals show their own status labels and are visually distinguishable from the active… — prior/p10-complete-noreason.png

E2E proof — log excerpts

[e1] needs:seed Unsupported CLI (old CLI whose catalog omits goal) -> pass :: Old-CLI fixture: installed @kilocode/cli@7.5.16 into the harness dev-log node_modules (binary lacks goal_report) and launched it; oldprobe11.log shows the live remote session's slash catalog (Use /cloud-pr, /compact, /init, /kilo-design) with no /goal. e1-scene.log shows 'android.widget.EditText /goal Ship it' retained after Send with the transcript holding only 'say hello'/'Hello!' (no '/goal Ship it, User message'); ctrl1.log proves the same Send tap sends an ordinary prompt ('android.view.ViewGroup control message, User message'), so the /goal draft retention is the fail-closed interception that emits the upgrade toast. The toast copy itself is not in the Android a11y hierarchy, so that o
[p1] Empty: a session whose metadata carries no goal renders no goal section and -> pass :: android emulator-5604: SCENE p1 OK, the digest shows the session header then the first transcript row 'say hello, User message' with no goal row between them (grep goal = 0 hits) and the composer 'android.widget.EditText Message tappable [126,2190][800,2310]' rendered (p1-scene.log).
/home/igor_kilocode_ai/.local/share/kwf/sections/add-goal-support-to-the-mobi-fa45/e2e-mobile-app/e1-scene.log
android.widget.Button Send message tappable [926,2188][1052,2314]
SCENE e1 MISS assert 'Please upgrade your CLI to use this command.' (after 8s)
android.widget.LinearLayout com.kilocode.kiloapp:id/action_bar_root tappable [0,0][1080,2400]
android.widget.FrameLayout android:id/content tappable [0,0][1080,2400]
android.widget.Button Go back tappable [0,163][101,264]
android.widget.Button Rename session: Greeting tappable [111,149][714,278]
android.view.View Greeting tappable [111,180][714,245]
android.widget.Button Context 16,204 of 1,310,720 tokens, 1% used, cost 0.32 cents. Tap to view context details. tappable [741,156][1043,271]
android.widget.TextView 1% tappable [863,195][900,232]
android.widget.TextView $0.0032 tappable [909,195][1013,232]
android.widget.TextView 11:31 AM tappable [466,1735][614,1774]
android.view.ViewGroup say hello, User message tappable [0,1793][1080,1931]
android.widget.TextView say hello tappable [847,1830][1011,1893]
android.view.ViewGroup Hello!, Assistant message tappable [0,1931][1080,2023]
android.widget.TextView Hello! tappable [37,1945][1045,2008]
android.widget.Button Mode: Code tappable [28,2068][261,2141]
android.widget.TextView Code tappable [106,2081][183,2127]
android.widget.Button DeepSeek: DeepSeek V4 Flash 0731 tappable [279,2068][918,2141]
android.widget.TextView DeepSeek: DeepSeek V4 Flash 0731 tappable [307,2082][840,2128]
android.widget.Button Paste from clipboard tappable [979,2068][1052,2141]
android.widget.Button Add attachment tappable [28,2214][101,2288]
android.widget.EditText /goal Ship it tappable [126,2193][800,2309]
android.widget.Button Start voice input tappable [835,2205][926,2297]
android.widget.Button Send message tappable [926,2188][1052,2314]
/home/igor_kilocode_ai/.local/share/kwf/sections/add-goal-support-to-the-mobi-fa45/e2e-mobile-app/oldprobe11.log
android.widget.Button Mode: Code tappable [28,1564][261,1637]
android.widget.TextView Code tappable [106,1577][183,1623]
android.widget.Button DeepSeek: DeepSeek V4 Flash 0731 tappable [279,1564][918,1637]
android.widget.TextView DeepSeek: DeepSeek V4 Flash 0731 tappable [307,1578][840,1624]
android.widget.Button Paste from clipboard tappable [979,1564][1052,1637]
android.widget.Button Use /cloud-pr tappable [0,1664][1080,1791]
android.widget.TextView /cloud-pr tappable [37,1682][944,1728]
android.widget.TextView Create a pull request following repo conventions tappable [37,1732][944,1769]
android.widget.TextView Insert tappable [970,1707][1043,1744]
android.widget.Button Use /compact tappable [0,1791][1080,1918]
android.widget.TextView /compact tappable [37,1809][944,1855]
android.widget.TextView compact the current session context tappable [37,1859][944,1896]
android.widget.TextView Insert tappable [970,1834][1043,1871]
android.widget.Button Use /init tappable [0,1918][1080,2045]
android.widget.TextView /init tappable [37,1936][944,1982]
android.widget.TextView guided AGENTS.md setup tappable [37,1986][944,2023]
android.widget.TextView Insert tappable [970,1961][1043,1998]
android.widget.Button Use /kilo-design tappable [0,2045][1080,2102]
android.widget.TextView /kilo-design tappable [37,2063][944,2102]
android.widget.TextView Insert tappable [970,2088][1043,2102]
android.widget.Button Add attachment tappable [28,2151][101,2225]
android.widget.EditText / tappable [126,2128][800,2248]
android.widget.Button Start voice input tappable [835,2142][926,2234]
android.widget.Button Send message tappable [926,2125][1052,2251]
/home/igor_kilocode_ai/.local/share/kwf/sections/add-goal-support-to-the-mobi-fa45/e2e-mobile-app/ctrl1.log
SCENE ctrl1 OK
android.widget.LinearLayout com.kilocode.kiloapp:id/action_bar_root tappable [0,0][1080,2400]
android.widget.FrameLayout android:id/content tappable [0,0][1080,2400]
android.widget.Button Go back tappable [0,163][101,264]
android.widget.Button Rename session: Greeting tappable [111,149][714,278]
android.view.View Greeting tappable [111,180][714,245]
android.widget.Button Context 15,766 of 1,310,720 tokens, 1% used, cost 0.39 cents. Tap to view context details. tappable [741,156][1043,271]
android.widget.TextView 1% tappable [863,195][900,232]
android.widget.TextView $0.0039 tappable [909,195][1013,232]
android.widget.TextView 11:31 AM tappable [466,1527][614,1566]
android.view.ViewGroup say hello, User message tappable [0,1585][1080,1723]
android.widget.TextView say hello tappable [847,1622][1011,1685]
android.view.ViewGroup Hello!, Assistant message tappable [0,1723][1080,1815]
android.widget.TextView Hello! tappable [37,1737][1045,1800]
android.view.ViewGroup control message, User message tappable [0,1815][1080,1953]
android.widget.TextView control message tappable [698,1852][1011,1915]
android.view.ViewGroup I received it — what would you like me to do?, Assistant message tappable [0,1953][1080,2143]
android.widget.Button Thought tappable [40,1965][1042,2039]
android.widget.TextView THOUGHT tappable [68,1983][206,2020]
android.widget.TextView I received it — what would you like me to do? tappable [37,2064][1045,2127]
android.widget.Button Add attachment tappable [28,2213][101,2287]
android.widget.EditText Message tappable [126,2192][800,2308]
android.widget.Button Start voice input tappable [835,2204][926,2296]
android.widget.Button Send message [926,2187][1052,2313]
/home/igor_kilocode_ai/.local/share/kwf/sections/add-goal-support-to-the-mobi-fa45/e2e-mobile-app/p1-scene.log
android.view.ViewGroup Hello., Assistant message tappable [0,2051][1080,2143]
android.widget.TextView Hello. tappable [37,2065][1045,2128]
android.widget.Button Add attachment tappable [28,2213][101,2287]
android.widget.EditText Message tappable [126,2190][800,2310]
android.widget.Button Start voice input tappable [835,2204][926,2296]
android.widget.Button Send message [926,2187][1052,2313]
SCENE p1 OK
android.widget.LinearLayout com.kilocode.kiloapp:id/action_bar_root tappable [0,0][1080,2400]
android.widget.FrameLayout android:id/content tappable [0,0][1080,2400]
android.widget.Button Go back tappable [0,163][101,264]
android.widget.Button Rename session: Greeting tappable [111,149][714,278]
android.view.View Greeting tappable [111,180][714,245]
android.widget.Button Context 15,648 of 1,310,720 tokens, 1% used, cost 0.1 cents. Tap to view context details. tappable [741,156][1043,271]
android.widget.TextView 1% tappable [863,195][900,232]
android.widget.TextView $0.0010 tappable [909,195][1013,232]
android.widget.TextView 11:19 AM tappable [466,1855][614,1894]
android.view.ViewGroup say hello, User message tappable [0,1913][1080,2051]
android.widget.TextView say hello tappable [847,1950][1011,2013]
android.view.ViewGroup Hello., Assistant message tappable [0,2051][1080,2143]
android.widget.TextView Hello. tappable [37,2065][1045,2128]
android.widget.Button Add attachment tappable [28,2213][101,2287]
android.widget.EditText Message tappable [126,2190][800,2310]
android.widget.Button Start voice input tappable [835,2204][926,2296]
android.widget.Button Send message [926,2187][1052,2313]
  • proved live: Composer forwards /goal clear for a session whose catalog advertises goal: typing /goal clear and sending clears the goal and the fixed goal section disappears. — android emulator-5608; SCENE p1 OK (exit 0): the run sent '/goal Clear verify goal' (assert 'Goal: Clear verify goal' passed = fixed section rendered), then '/goal clear', then assert absent 'Goal: Clear verify goal' passed and the app transcript shows the forwarded command at p1-scene.log:19 'android.view.ViewGroup /goal clear, User message tappable [0,2005][1080,2143]' with the composer re-enabled (p1-scene.log:22 'android.widget.EditText Message tappable'); the section-present state is captured separately in e2e-mobile-app/p1-goal-present.log:12 'android.widget.Button Active goal. Goal…
  • proved live: Empty: a session whose metadata carries no goal renders no goal section and leaves the transcript layout where it was. — Fresh run 2026-09-13 on emulator-5612 (android) via a no-goal remote CLI session (session.ses_f6737d2c1ffegWMWP79qPGtJb4): 'SCENE p3 OK' with digest showing the session header 'Rename session: New session - 2026-09-13T03:20:50.750Z' and transcript 'Reply with the single word ready., User message' + 'ready, Assistant message' and no goal element (no 'Active goal'/'Paused goal'/'Goal:' row), so the no-goal session renders no goal section; p3.png captured for the visual reviewer (no UX-DEFECT observed from the digest).
  • proved live: Happy path: set a goal, see the fixed section, edit it, then remove it. — android emulator-5610. Re-ran the parked p2 scene on a live remote CLI session (session.sh remote-enter; per-worktree kilo-e2e-cli tmux), which reached the action sheet's Remove confirmation after setting and editing the goal: p2-run2.log (MISS only at the post-run capture, not at a step) carries 'android.widget.TextView Remove goal? tappable [133,1065][947,1136]', 'android.widget.TextView The CLI clears this session's goal. tappable [70,1157][1010,1214]' and 'android.widget.Button REMOVE GOAL tappable [666,1294][978,1436]'. The in-script confirm tap was blocked by the harness alert-tap bug…
  • proved live: Pause and resume: send /goal pause, the section shows the paused status, then tap the section and Resume and the section shows the active status again. — android emulator-5612; scripted scene p3-script.log line 1 reads 'SCENE p3 OK' and its replay (p3.replay.json) asserted Resume goal / Edit goal / Remove goal on a non-active goal, Resume->Active goal, Pause goal->Paused goal, Resume goal->Active goal (Pause was driven by the section control, which sends /goal pause); p3-complete-sheet.log line 27 shows 'android.widget.Button Resume goal tappable [0,1896][1080,2043]' offered for a complete goal and p3-script.log line 10 shows 'android.widget.Button Goal complete. Goal: Verify pause and resume tappable [0,360][1080,549]' with its reason at line…
  • proved live: needs:fault Retryable unhappy: with the network faulted, sending a goal command shows the failure toast and leaves the section unchanged; after the fault clears, retry succeeds and the section…
  • proved live: needs:recording The fixed section stays under the header while the transcript scrolls: scroll the transcript and confirm the goal row with its status and objective stays fixed under the session… — Fresh android run on emulator-5612 (2026-09-13): p5-scene.log line 1 'SCENE p5 OK'; line 12 'android.widget.Button Active goal. Goal: p5 scroll objective tappable [0,360][1080,483]' shows the goal row with its status label and objective directly under the session header after the down-swipe, so the row stayed while the transcript moved. Goal set live via the composer ('/goal p5 scroll objective' -> 'Send message') on an interactive remote CLI session (session ses_f664bfa0effec5XZ3HiuQZzdyM, created with remote-cli.sh exec run); the parked e2e-scripts.json p5 step list was updated to these…
  • proved live: needs:seed A blocked goal: a session whose metadata reports status blocked with a reason shows 'Goal blocked', the objective, and the reason text. — Android emulator-5606. Seeded via a live remote CLI session (session.sh remote-enter) whose goal turn called goal_report(status=blocked); singleton script run logged 'SCENE blockedgoal OK' (line 1). Digest lines prove all three required elements: 'android.widget.TextView Goal blocked', 'android.widget.TextView Ship p17 objective. This task is blocked because the production credentials are unavailable…' (objective), and 'android.widget.TextView Reported by the working model, not independently verified: Production credentials are unavailable and cannot be obtained in this environment, so the…
  • proved live: needs:seed A complete goal: a session whose metadata reports status complete with a reason shows 'Goal complete', the objective, and the reason text. — Android emulator-5604, remote CLI session ses_f67129a44ffeBMFLfUyBdmvMiw. p5-complete.log line 7 'SCENE gc2 OK'; line 8 "android.widget.Button Goal complete. Goal: Report the goal finished with a reason tappable [0,360][1080,555]" shows the status label plus objective; line 11 "android.widget.TextView Reported by the working model, not independently verified: The session goal was only to greet and then report completion; no implementation work was requested or pending." shows the reason text; line 17 is the CLI store metadata {"kilo.goal":{"text":"Report the goal finished with a…
  • proved live: needs:seed Unsupported CLI (old CLI whose catalog omits goal): typing /goal Ship it shows 'Please upgrade your CLI to use this command.' and the transcript does not gain a user row holding the text…
  • proved live: ux-check: Goal with a reason shows the reason line; a goal without a reason shows none; complete/blocked/paused goals show their own status labels and are visually distinguishable from the active… — Android, emulator-5612, live remote CLI session ses_f670ddf6affe48COX3dWoMHt3u on 2026-09-13: 'Active goal' and 'Paused goal' render the objective with no reason line (p10-active.log/p10-paused.log have zero 'Reported by the working model' lines), and 'Goal complete'/'Goal blocked' render a reason line — p10.log quotes 'android.widget.TextView Reported by the working model, not independently verified: blocked by design'; resume returned 'Active goal'. Screenshots p10-active.png, p10-paused.png, p10-resumed.png, p10-complete.png, p10-blocked.png for the visual reviewer; no UX-DEFECT on the…
  • proved live: ux-check: Open a session with no goal: no goal row renders and the existing layout is unchanged. — android emulator-5608; on the live session whose metadata carries no goal p14-scene3.log carries 'SCENE p14 OK' with the composer digest 'android.widget.EditText Message tappable [126,2190][800,2310]' and 'android.widget.Button Send message [926,2187][1052,2313]' and no goal-row button (the absent 'goal. Goal:' step passed), so the layout is intact with no goal row; no UX-DEFECT observed. Screenshot p14.png is for the visual reviewer.
  • proved live: ux-check: Remote CLI session, run /goal Ship the release: a fixed row appears directly under the session header showing 'Active goal' in the emphasized (primary) style and the objective text; the… — android emulator-5606: a live remote CLI session rendered the fixed goal row directly under the header — 'android.widget.Button Active goal. Goal: Ship the release tappable [0,360][1080,483]' with the transcript immediately beneath at 'User message tappable [0,483][1080,853]' (p8.log) — and the row kept the same [0,360][1080,483] bounds across the swipes and a transcript re-render (p8-scroll.log), with the /goal Ship the release composer step in p8-setup.log; no UX-DEFECT observed in the digest, and the transcript was shorter than the viewport so a scroll gesture moved nothing — the scroll…
  • proved live: ux-check: Remote session whose catalog advertises goal: select /goal with no argument and press Send — the composer visibly indicates an objective must be added (no silent no-op); submitting with…
  • proved live: ux-check: Session whose catalog does not advertise goal: typing /goal Ship it does not send ordinary chat and surfaces the upgrade-required message. — Cloud-agent session on emulator-5612 (android), created via the app's New session (Run on: Cloud Agent, repo iscekic/getel) after e2e/session.sh cloud-enter failed HTTP 401 'Unauthorized resource delegation request'; with the session idle (digest shows the completed turn 'This message isn't a recognized command or task…, Assistant message' and an enabled composer), sending '/goal Ship it' left the draft in the composer (digest: 'android.widget.EditText /goal Ship it tappable [126,2191][800,2311]') and added no user message to the transcript (only 'fake:echo:hello, User message'), so the…
  • proved live: ux-check: Tap Edit goal, replace the objective, Save: the fixed row updates to the new objective after the CLI confirms, with no stale value left on screen.
  • proved live: ux-check: Tap Pause goal: the row's status changes to 'Paused goal'; resume restores 'Active goal'.
  • proved live: ux-check: Tap Remove goal, confirm the destructive dialog: the fixed row disappears and the transcript reclaims the space with no blank gap.
  • proved live: ux-check: Tap the goal row: a native action sheet opens with 'Edit goal', 'Pause goal' (active only), 'Remove goal', and Cancel; a paused goal offers 'Resume goal' instead of Pause. — android emulator-5554: SCENE p11 OK (line 1); with the goal active the sheet asserted Edit/Pause/Remove/Cancel and tapping Pause goal set 'Paused goal'; the paused row's sheet digest shows 'android.widget.Button Edit goal' (27), 'Resume goal' (29), 'Remove goal' (31), 'Cancel' (33) and no Pause button — matching Resume-instead-of-Pause; screenshot p11.png captured for the visual reviewer; no UX-DEFECT on the session screen or sheet.
  • proved live: ux-check: With the goal row visible, scroll the transcript: the goal row stays pinned and unmoved while transcript content moves. — android emulator-5610, remote CLI session ses_f67194eccffeCFCCP5uWsZaylE, goal 'Verify the goal section stays pinned under the session header while the transcript scrolls'. Before scroll, p9-before digest shows the goal row 'Active goal. Goal: ...' at [0,360][1080,529] with the transcript prompt 'Use the existing conversation...' at [250,529][1011,1095]; after swipe down, p9-down shows the same goal row [0,360][1080,529] while the prompt moved to [250,658][1011,1470] and 'Scroll to bottom tappable [946,1342][1038,1434]' appeared (p9-run2.log); two further swipes moved transcript content again…
Owner request

Add /goal support to the mobile app for remote CLI sessions and, where the session supports it, cloud agent sessions.

Surface: mobile-app.

Context:
The Kilo CLI keeps a session goal. The CLI stores it in session metadata under kilo.goal with text, status (active, complete, blocked, or paused), and an optional reason. The CLI command catalog already advertises goal as a reserved slash command (/goal <objective>, /goal pause, /goal resume, /goal clear). The terminal and VS Code surfaces already show a goal row and a goal composer. The mobile app does not show the goal and has no goal-aware composer.

Goal section:
When the session metadata contains a goal, show a fixed goal section under the session header.

  • The section shows the goal status and the goal text.
  • The section stays fixed while the transcript scrolls.
  • The section shows the optional reason when the CLI provides one.
  • Show the status for all four values. Distinguish an active goal clearly.
  • When the metadata has no goal, show nothing and change no existing layout.

Goal actions:
Tapping the goal section opens the goal controls.

  • Edit: let the user replace the objective. Send /goal <new objective> so the CLI owns the state.
  • Remove: clear the goal with /goal clear.
  • Match the CLI actions for pause and resume when the CLI reports them.

Slash command:
Support /goal in the session composer for sessions whose catalog advertises it.

  • Selecting /goal with no argument enters a goal compose mode, and the submission sends /goal <objective>.
  • /goal pause, /goal resume, and /goal clear forward to the CLI.
  • Keep the recognized-command behavior and the existing fail-closed upgrade path.
  • Do not send a goal command as ordinary chat when the CLI does not support it.

Cloud agent sessions:
Support goal only when the cloud agent session reports goal state or a goal command.
Do not invent goal state for a session that does not report it.

Scope and safety:

  • Keep read-only and unsupported sessions unchanged.
  • Do not commit fixtures, E2E-only code, test hooks, or test-only runtime flags.
  • Keep temporary test support outside the product diff.

Verification:

  • Add focused unit tests for goal metadata projection, the slash-command parse path, and the goal actions.
  • Run the mobile device end-to-end (E2E) proof on one platform.
  • Start a remote CLI session and set a goal with /goal <objective>.
  • Prove the fixed section shows under the header with the objective and its status.
  • Prove the section stays fixed while the transcript scrolls.
  • Tap the section, edit the goal, and prove the section updates.
  • Remove the goal and prove the section disappears.
  • Put the recording, or screenshots if a recording is unavailable, in the pull request (PR) body.

Delivery:

  • Let the workflow open and maintain the PR.
  • Do not leave follow-ups.
  • Finish only after current-head continuous integration (CI) is green and Kilobot recommends Merge.

@iscekic
iscekic marked this pull request as draft September 13, 2026 11:55
@kilo-code-bot

kilo-code-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the follow-up change adding @kilocode/cloud-agent-sdk to packages/trpc; the dependency is required by the cli-sessions-v2-router SDK import that is pulled into the mobile tRPC declaration bundle, and the declaration plus lockfile entry match sibling workspace importers with no defects found.

Files Reviewed (2 files)
  • packages/trpc/package.json - added @kilocode/cloud-agent-sdk workspace dependency
  • pnpm-lock.yaml - generated importer entry for packages/trpc
Previous Review Summary (commit 38bf538)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 38bf538)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the mobile session-goal section, /goal composer fail-closed parsing, SDK goal projection and reason preservation, and the web/session-ingest metadata page plumbing; no high-confidence security, runtime, or logic defects found.

Files Reviewed (113 files)
  • apps/mobile/src/components/agents/chat-composer-slash-commands.ts - goal parse, isGoalCommandDraft, reserved upgrade set
  • apps/mobile/src/components/agents/chat-composer-slash-commands-goal.test.ts
  • apps/mobile/src/components/agents/chat-composer-slash-commands.test.ts
  • apps/mobile/src/components/agents/chat-composer.tsx - goal compose mode state and hint
  • apps/mobile/src/components/agents/chat-composer.test.ts
  • apps/mobile/src/components/agents/mobile-session-manager.ts - snapshot goal projection
  • apps/mobile/src/components/agents/mobile-session-page-adapter.ts - page goal into info
  • apps/mobile/src/components/agents/mobile-session-page-adapter.test.ts
  • apps/mobile/src/components/agents/session-detail-content.tsx - goal actions, blocking-interaction clearing
  • apps/mobile/src/components/agents/session-detail-content.test.ts
  • apps/mobile/src/components/agents/session-detail-queue.test.ts
  • apps/mobile/src/components/agents/session-goal-actions.ts
  • apps/mobile/src/components/agents/session-goal-actions.test.ts
  • apps/mobile/src/components/agents/session-goal-section.tsx
  • apps/mobile/src/components/agents/use-interaction-handlers.ts - boolean returns
  • apps/mobile/src/i18n/locales/*.json - 87 catalogs, all 14 agentChat.goal keys present with matching placeholders and unique English copy
  • apps/web/src/lib/session-ingest-client.ts - optional sessionMetadata schema/result
  • apps/web/src/routers/cli-sessions-v2-router.ts - goal projection, raw metadata stripped
  • apps/web/src/routers/cli-sessions-v2-router.test.ts
  • packages/cloud-agent-sdk/src/index.ts
  • packages/cloud-agent-sdk/src/normalizer.ts - projectSessionGoal validation
  • packages/cloud-agent-sdk/src/normalizer.test.ts
  • packages/cloud-agent-sdk/src/service-state.ts - preserveGoalReason
  • packages/cloud-agent-sdk/src/service-state.test.ts
  • packages/cloud-agent-sdk/src/types.ts - SessionGoal, SessionGoalStatus
  • services/session-ingest/src/routes/api.ts - initial-page metadata, best-effort
  • services/session-ingest/src/routes/api.test.ts

No potential memory leaks were introduced: the changes are pure projection/state updates with no new subscriptions, timers, or listeners.


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic force-pushed the kwf/add-goal-support-to-the-mobi-fa45 branch from 38bf538 to 8a1c6b5 Compare September 13, 2026 16:49
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 17:01
@iscekic
iscekic requested a review from eshurakov September 13, 2026 17:10
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 13, 2026
@iscekic iscekic self-assigned this Sep 13, 2026
@iscekic
iscekic requested a review from pandemicsyn September 13, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants